package com.tq.framework.beans;

import java.util.List;

/**
 * Bean工厂
 *
 * @author TqCoder
 * @since 2.0.0
 */
public interface BeanFactory {

    /**
     * 根据beanName获取bean
     *
     * @param beanName beanName
     * @return bean实例
     */
    Object getBean(String beanName);

    /**
     * 根据beanType获取bean
     *
     * @param beanType beanType
     * @param <T>      泛型
     * @return bean实例
     */
    <T> T getBean(Class<T> beanType);

    /**
     * 根据beanType获取bean集合
     *
     * @param beanType beanType
     * @param <T>      泛型
     * @return bean实例集合
     */
    <T> List<T> getBeans(Class<T> beanType);

}
